<html>
<head>
	<title><? if (!empty($page_title)) { echo he($page_title)." for "; } echo he($row['title'])." ";  if (!empty($row['count'])) { echo " [{$row['count']} photos] "; } ?>:: Geograph Portal</title>
	<link rel="stylesheet" type="text/css" href="style.css" />
	<? if (empty($_SERVER['QUERY_STRING']) && !empty($row['description'])) { ?>
		<meta name="description" content="<? echo he($row['description']); ?>"/>
	<? } else { ?>
		<meta name="description" content="Geograph Portal featuring <? echo he($row['count']); ?> photos of <? echo he($row['title']); ?>."/>
	<? } ?>
</head>
<body>
	<div class="header">
		<div style="float:right">
			by <a href="http://www.geographs.org/portals/profile/<? echo he($row['user_id']); ?>"><? echo he($row['realname']); ?></a>
		</div>
		<h2><a href="/" title="<? echo he($row['excerpt']); ?>"><? echo he($row['title']); ?> :: Geograph Portal</a></h2>
	</div>
	<div class="topbox">
		<ul>
			<li><? echo he($row['count']); ?> images</li>

			<li><a href="/map.php">Map</a><sup style=color:red>new</sup></li>
			<li><a href="/statistics.php">Statistics</a></li>
			<li><a href="/breakdown.php">Breakdown</a></li>
		</ul>
		
		<form action="/search.php" method="get">
			<input type="text" name="q" value="<? if (empty($_GET['q'])) { echo 'search keywords...'; } else { echo he($_GET['q']); } ?>" size="15" onfocus="if (this.value=='search keywords...') {this.value='';}"/><input type="submit" value="Search"/>
		</form>	

		<ul>
			<li>&middot; <a href="http://www.geographs.org/portals/">Portal Directory</a> (<a href="http://www.geographs.org/portals/faq.php">FAQ</a>)</li>
		</ul>

		<? if (!empty($_SESSION['realname'])) { ?>
			<p>Hi <i><? echo he($_SESSION['realname']); ?></i>! <a href="http://www.geographs.org/portals/logout.php">Logout</a></p>
		<? } ?><br/>
	</div>

        <div style="font-size:0.7em; color:red;padding:2px; text-align:center;margin-bottom:10px; background-color:#eeeeee">
		<b>Note</b>: Portals are still a very early experiment. <br/>
                During this stage many portals <? if (empty($portal['suggest_note'])) { ?>will only display a very small selection of the available images, <br/>typically maximum 100-800 images, and<? } ?> only includes images below id 2031907</div>

	<div id="content">
